﻿Namespace DotNetNuke.Modules.ActiveForums
    Public Class User
        Private _isAdmin As Boolean = False
        Private _isSuperUser As Boolean = False
        Private _profile As UserProfileInfo = Nothing
        Private _properties As Hashtable = Nothing
        Private _userId As Integer = -1
        Private _userName As String = String.Empty
        Private _userRoles As String
        Private _lastName As String = String.Empty
        Private _firstName As String = String.Empty
        Private _displayName As String = String.Empty
        Private _email As String = String.Empty
        Private _dateUpdated As Date
        Private _dateCreated As Date
        Private _userForums As String = String.Empty
        Public Property FirstName() As String
            Get
                Return _firstName
            End Get
            Set(ByVal value As String)
                _firstName = value
            End Set
        End Property
        Public Property LastName() As String
            Get
                Return _lastName
            End Get
            Set(ByVal value As String)
                _lastName = value
            End Set
        End Property
        Public Property DisplayName() As String
            Get
                Return _displayName
            End Get
            Set(ByVal value As String)
                _displayName = value
            End Set
        End Property
        Public Property Email() As String
            Get
                Return _email
            End Get
            Set(ByVal value As String)
                _email = value
            End Set
        End Property
        Public Property DateCreated() As Date
            Get
                Return _dateCreated
            End Get
            Set(ByVal value As Date)
                _dateCreated = value
            End Set
        End Property
        Public Property DateUpdated() As Date
            Get
                Return _dateUpdated
            End Get
            Set(ByVal value As Date)
                _dateUpdated = value
            End Set
        End Property
        Public Property IsAdmin() As Boolean
            Get
                Return _isAdmin
            End Get
            Set(ByVal value As Boolean)
                _isAdmin = value
            End Set
        End Property
        Public Property IsSuperUser() As Boolean
            Get
                Return _isSuperUser
            End Get
            Set(ByVal value As Boolean)
                _isSuperUser = value
            End Set
        End Property

        Public Property Profile() As UserProfileInfo
            Get
                Return _profile
            End Get
            Set(ByVal value As UserProfileInfo)
                _profile = value
            End Set
        End Property

        Public Property Properties() As System.Collections.Hashtable
            Get
                Return _properties
            End Get
            Set(ByVal value As System.Collections.Hashtable)
                _properties = value
            End Set
        End Property

        Public Property UserId() As Integer
            Get
                Return _userId
            End Get
            Set(ByVal value As Integer)
                _userId = value
            End Set
        End Property
        Public Property UserName() As String
            Get
                Return _userName
            End Get
            Set(ByVal value As String)
                _userName = value
            End Set
        End Property

        Public Property UserRoles() As String
            Get
                Return _userRoles
            End Get
            Set(ByVal value As String)
                _userRoles = value
            End Set
        End Property
        Public ReadOnly Property PrefBlockSignatures() As Boolean
            Get
                Return Profile.PrefBlockSignatures
            End Get
        End Property
        Public ReadOnly Property PrefBlockAvatars() As Boolean
            Get
                Return Profile.PrefBlockAvatars
            End Get
        End Property
        Public ReadOnly Property PostCount() As Integer
            Get
                Return Profile.PostCount
            End Get
        End Property
        Public ReadOnly Property TrustLevel() As Integer
            Get
                Return Profile.TrustLevel
            End Get
        End Property
        Public ReadOnly Property PrefTopicSubscribe() As Boolean
            Get
                Return Profile.PrefTopicSubscribe
            End Get
        End Property
        Public ReadOnly Property CurrentUserType() As CurrentUserTypes
            Get
                Return Profile.CurrentUserType
            End Get
        End Property
        Public Property UserForums() As String
            Get
                Return _userForums
            End Get
            Set(ByVal value As String)
                _userForums = value
            End Set
        End Property
        Public Sub New()
            _userId = -1
            _isSuperUser = False
            _isAdmin = False
            _profile = New UserProfileInfo
            _userRoles = Globals.DefaultAnonRoles & "|-1;||"
        End Sub
    End Class
End Namespace

